<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <style>
        body {
            background: #f8f8f8;
        }
    </style>
</head>

<body>
    <div class="aui-content vue">
        <div class="loading" v-if="loading"></div>

        <!-- 餐饮 -->
        <div v-if="cate_name=='goods'">
            <div style="text-align:center;background:#ffffff;margin-bottom:0.5rem;padding:0.75rem">
                <div class="aui-row" style="text-align:left">
                    <div class="aui-col-xs-6">菜名</div>
                    <div class="aui-col-xs-2">数量</div>
                    <div class="aui-col-xs-2">单价</div>
                    <div class="aui-col-xs-2">小计</div>
                </div>
                <div class="aui-row" style="text-align:left;font-size:0.65rem" v-for="item in info.goods">
                    <div class="aui-col-xs-6">{{item.goodsName}}</div>
                    <div class="aui-col-xs-2">{{item.goodsNum}}份</div>
                    <div class="aui-col-xs-2">￥{{item.goodsPrice}}</div>
                    <div class="aui-col-xs-2">￥{{item.subTotal}}</div>
                </div>
                <div class="aui-row" style="text-align:left;font-size:0.65rem">
                    <div class="aui-col-xs-6">餐具</div>
                    <div class="aui-col-xs-2">{{info.num}}位</div>
                    <div class="aui-col-xs-2">￥{{info.service_money/info.num}}</div>
                    <div class="aui-col-xs-2">￥{{info.service_money}}</div>
                </div>
            </div>
            <ul class="aui-list aui-list-in">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单人</div>
                        <div class="aui-list-item-right" @click="callTel(info.iphone)">{{info.name}} - {{info.iphone}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单时间</div>
                        <div class="aui-list-item-right">{{info.pay_time}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">订单编号</div>
                        <div class="aui-list-item-right">{{info.sid}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">支付方式</div>
                        <div class="aui-list-item-right">{{info.pay_type}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">实付</div>
                        <div class="aui-list-item-right">￥{{info.pay_money}}</div>
                    </div>
                </li>
            </ul>
        </div>

        <!-- 酒店 -->
        <div v-if="cate_name=='hotel'">
            <div style="text-align:center;background:#ffffff;margin-bottom:0.5rem;padding:0.75rem">
                <div class="aui-row" style="text-align:left">
                    <div class="aui-col-xs-6">房间类型</div>
                    <div class="aui-col-xs-2">单价</div>
                    <div class="aui-col-xs-2">数量</div>
                    <div class="aui-col-xs-2">天数</div>
                </div>
                <div class="aui-row" style="text-align:left;font-size:0.65rem" v-for="item in info.room_list">
                    <div class="aui-col-xs-6">{{item.room_type}}</div>
                    <div class="aui-col-xs-2">￥{{item.room_price}}</div>
                    <div class="aui-col-xs-2">{{item.room_num}}间</div>
                    <div class="aui-col-xs-2">{{info.stayDays}}天</div>
                </div>
            </div>
            <ul class="aui-list aui-list-in">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单人</div>
                        <div class="aui-list-item-right" @click="callTel(info.phone)">{{info.name}} - {{info.phone}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单时间</div>
                        <div class="aui-list-item-right">{{info.pay_time}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">订单编号</div>
                        <div class="aui-list-item-right">{{info.out_trade_no}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">支付方式</div>
                        <div class="aui-list-item-right">{{info.pay_type}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">实付</div>
                        <div class="aui-list-item-right">￥{{info.pay_money}}</div>
                    </div>
                </li>
            </ul>
        </div>

        <!-- KTV -->
        <ul class="aui-list aui-list-in" v-if="cate_name=='KTV'">
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">下单人</div>
                    <div class="aui-list-item-right" @click="callTel(info.phone)">{{info.name}} - {{info.phone}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">房间类型</div>
                    <div class="aui-list-item-right">{{info.room_type}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">价格</div>
                    <div class="aui-list-item-right">￥{{info.room_price}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">预订日期</div>
                    <div class="aui-list-item-right">{{info.dateTime}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">包厢时间</div>
                    <div class="aui-list-item-right">{{info.business_hours}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">订单编号</div>
                    <div class="aui-list-item-right">{{info.out_trade_no}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">下单时间</div>
                    <div class="aui-list-item-right">{{info.pay_time}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">支付方式</div>
                    <div class="aui-list-item-right">{{info.pay_type}}</div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-title">实付</div>
                    <div class="aui-list-item-right">￥{{info.pay_money}}</div>
                </div>
            </li>
        </ul>

        <!-- 养生 -->
        <div v-if="cate_name=='health'">
            <div style="text-align:center;background:#ffffff;margin-bottom:0.5rem;padding:0.75rem">
                <div class="aui-row" style="text-align:left">
                    <div class="aui-col-xs-6">服务类型</div>
                    <div class="aui-col-xs-3">单价</div>
                    <div class="aui-col-xs-3">人数</div>
                </div>
                <div class="aui-row" style="text-align:left;font-size:0.65rem" v-for="item in info.room_list">
                    <div class="aui-col-xs-6">{{item.room_type}}</div>
                    <div class="aui-col-xs-3">￥{{item.room_price}}</div>
                    <div class="aui-col-xs-3">{{item.room_num}}人</div>
                </div>
            </div>
            <ul class="aui-list aui-list-in">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单人</div>
                        <div class="aui-list-item-right" @click="callTel(info.phone)">{{info.name}} - {{info.phone}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单时间</div>
                        <div class="aui-list-item-right">{{info.pay_time}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">订单编号</div>
                        <div class="aui-list-item-right">{{info.out_trade_no}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">支付方式</div>
                        <div class="aui-list-item-right">{{info.pay_type}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">实付</div>
                        <div class="aui-list-item-right">￥{{info.pay_money}}</div>
                    </div>
                </li>
            </ul>
        </div>

        <!-- 景点 -->
        <div v-if="cate_name=='scenic'">
            <div style="text-align:center;background:#ffffff;margin-bottom:0.5rem;padding:0.75rem">
                <div class="aui-row" style="text-align:left">
                    <div class="aui-col-xs-6">服务类型</div>
                    <div class="aui-col-xs-3">单价</div>
                    <div class="aui-col-xs-3">人数</div>
                </div>
                <div class="aui-row" style="text-align:left;font-size:0.65rem" v-for="item in info.scenic_list">
                    <div class="aui-col-xs-6">{{item.scenic_type}}</div>
                    <div class="aui-col-xs-3">￥{{item.scenic_price}}</div>
                    <div class="aui-col-xs-3">{{item.scenic_num}}人</div>
                </div>
            </div>
            <ul class="aui-list aui-list-in">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单人</div>
                        <div class="aui-list-item-right" @click="callTel(info.phone)">{{info.name}} - {{info.phone}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单时间</div>
                        <div class="aui-list-item-right">{{info.pay_time}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">订单编号</div>
                        <div class="aui-list-item-right">{{info.out_trade_no}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">支付方式</div>
                        <div class="aui-list-item-right">{{info.pay_type}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">实付</div>
                        <div class="aui-list-item-right">￥{{info.pay_money}}</div>
                    </div>
                </li>
            </ul>
        </div>

        <!-- 其他 -->
        <div v-if="cate_name=='other'">
            <div style="text-align:center;background:#ffffff;margin-bottom:0.5rem;padding:0.75rem">
                <div class="aui-row" style="text-align:left">
                    <div class="aui-col-xs-6">菜名</div>
                    <div class="aui-col-xs-2">数量</div>
                    <div class="aui-col-xs-2">单价</div>
                    <div class="aui-col-xs-2">小计</div>
                </div>
                <div class="aui-row" style="text-align:left;font-size:0.65rem" v-for="item in info.list">
                    <div class="aui-col-xs-6">{{item.goods_name}}</div>
                    <div class="aui-col-xs-2">{{item.goods_num}}份</div>
                    <div class="aui-col-xs-2">￥{{item.goods_price}}</div>
                    <div class="aui-col-xs-2">￥{{item.subTotal}}</div>
                </div>
            </div>
            <ul class="aui-list aui-list-in">
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单人</div>
                        <div class="aui-list-item-right" @click="callTel(info.iphone)">{{info.name}} - {{info.phone}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">下单时间</div>
                        <div class="aui-list-item-right">{{info.pay_time}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">订单编号</div>
                        <div class="aui-list-item-right">{{info.out_trade_no}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">支付方式</div>
                        <div class="aui-list-item-right">{{info.pay_type}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">实付</div>
                        <div class="aui-list-item-right">￥{{info.pay_money}}</div>
                    </div>
                </li>
                <li class="aui-list-item">
                    <div class="aui-list-item-inner">
                        <div class="aui-list-item-title">预订留言</div>
                        <div class="aui-list-item-right">{{info.remark}}</div>
                    </div>
                </li>
            </ul>
        </div>
    </div>

    <script type="text/javascript" src="../script/vue.js"></script>
    <script type="text/javascript" src="../script/base64.js"></script>
    <script type="text/javascript" src="../script/app.js"></script>
    <script type="text/javascript">
        apiready = function() {
            // console.log(api.pageParam.cate_name)
            api.setRefreshHeaderInfo({
                loadingImg: 'widget://image/refresh.png',
                bgColor: '#f8f8f8',
                textColor: '#505050',
                textDown: '下拉刷新...',
                textUp: '松开刷新...'
            }, function(ret, err) {
                Ve.getInfo(function() {
                    api.refreshHeaderLoadDone();
                })
            });

            var Ve = new Vue({
                el: '.vue',
                data: {
                    loading: true,
                    info: {},
                    message: api.pageParam.message,
                    cate_name: api.pageParam.cate_name
                },
                methods: {
                    getInfo: function(callback) {
                        app.request.post('/myhome/reserve_detail', {
                            id: this.message.id,
                            cate_name: this.cate_name,
                            signature: app.sign(this.message.id)
                        }, {}, function(res) {
                            // console.log(JSON.stringify(res))
                            callback && callback()
                            if (res.code == 1) {
                                Ve.info = res.data
                            } else {
                                app.error(res.msg)
                            }
                            app.loadingFinish(Ve)
                        })
                    },
                    callTel: function(tel) {
                        api.call({
                            type: 'tel_prompt',
                            number: tel
                        });
                    }
                },
                created: function() {
                    this.getInfo()
                }
            })
        }
    </script>
</body>

</html>
